import numpy as np
import cv2

asswecan = cv2.dnn.readNetFromONNX('asswecan')


# 0 mask，1 good，2 side
def detect_(img):
    imgii = cv2.dnn.blobFromImage(img, scalefactor=1 / 255, size=(112, 112))
    asswecan.setInput(imgii)
    a = asswecan.forward()
    return np.argmax(a)
